# Contributor: Maxim Karasev <begs@disroot.org>
# Maintainer: Dhruvin Gandhi <contact@dhru.vin>
pkgname=nvim-lspconfig
pkgver=1.0.0
pkgrel=0
pkgdesc="quickstart configurations for the neovim LSP client"
url="https://github.com/neovim/nvim-lspconfig"
arch="noarch"
license="Apache-2.0"
subpackages="$pkgname-doc"
source="https://github.com/neovim/nvim-lspconfig/archive/refs/tags/v$pkgver/nvim-lspconfig-$pkgver.tar.gz"
depends="neovim"
options="!check" # requires vusted

build() {
	nvim -u NONE -i NONE -e --headless -c "helptags doc" -c quit
}

package() {
	local plgdir="$pkgdir"/usr/share/nvim/site/pack/dist/opt/$pkgname
	install -d "$plgdir"
	cp -a lua plugin "$plgdir"
	install -Dm644 doc/*.txt doc/tags -t "$plgdir"/doc
	install -Dm644 doc/*.md README.md -t "$pkgdir"/usr/share/doc/$pkgname
}

doc() {
	default_doc
	amove usr/share/nvim/site/pack/dist/opt/$pkgname/doc
}

sha512sums="
0ccb50310e6fcaa3933b9cbfddd8694cad30776900005ce190f1af9a32b7bdce3c51a86ff748d70e513aad82b7d2c0cc2e9fadf95787f5381e681d145520f3cd  nvim-lspconfig-1.0.0.tar.gz
"
